package net.towee.client.event.core;

import net.towee.model.account.AccountProfile;

import com.google.gwt.event.shared.GwtEvent;

public class AccountProfileUpdatedEvent extends GwtEvent<AccountProfileUpdateHandler> {
	public static Type<AccountProfileUpdateHandler> TYPE = new Type<AccountProfileUpdateHandler>();
	private final AccountProfile profile;

	public AccountProfileUpdatedEvent(AccountProfile profile) {
		this.profile = profile;
	}

	@Override
	protected void dispatch(AccountProfileUpdateHandler handler) {
		handler.accountProfileUpdated(profile);
	}

	@Override
	public Type<AccountProfileUpdateHandler> getAssociatedType() {
		return TYPE;
	}
}
